package com.example.campusforumapi.dao;

import com.example.campusforumapi.entity.Activity;
import com.example.campusforumapi.entity.ActivityTag;
import com.example.campusforumapi.entity.Category;
import com.example.campusforumapi.entity.Department;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;

@Mapper
public interface ActivityMapper {
    /*
     * 查询所有文章分类列表
     * */
    @Select("select * from activitytag order by tag_id")
    List<ActivityTag> getCategories();
    /*
     * 查询所有学院信息列表
     * */
    @Select("select * from department order by department_id")
    List<Department> getDepartments();

    /*
     * 返回分页数据列表
     * @param pageUtil
     * @return
     * */
    List<Activity> list(Integer activityId, Integer userId, String title, Integer tagId, Integer departmentId,Integer status, LocalDateTime startTime, LocalDateTime endTime);
    /*
     * 删除一条或多条活动记录
     * */
    int delActivity(List<Integer> ids);
    /*
     * 添加
     * @paramActivity
     * */
    int insertActivity(Activity activity);
    /*
     * 修改
     * @paramArticle
     * */
    int updActivity(Activity activity);

    List<Activity> AuditList(Integer activityId);
    //修改活动审核状态
    int updAproveActivity(Activity activity);

    int updRejectActivity(Activity activity);

}
